
import random
from re import X
x = 50
y=0
computerlist = ["石头", "剪刀", "布"]
while 1:
    y = y + 1
    x = x - 5
    if x < 100 and  x> 0:
        print("*" * 50)
        print("第%d回合开始，扣除5金币，当前金币为%d" % (y, x))
        mypoint = input("您请出（石头、剪刀、布）：")
        computerpoint = random.choice(computerlist)
    if x<100 and x>0:
        mypoint = input("您请出：")
        computerpoint = random.choice(computerlist)
        if mypoint == computerpoint:
            print("您出的是：%s,电脑出的是：%s，本回合平局，当前您的金币为%d"% (mypoint, computerpoint, x))
        elif mypoint == "石头" and computerpoint == "剪刀":
            x = x+10
            print("您出的是：%s,电脑出的是：%s，本回合您赢了,当前您的金币为%d" % (mypoint, computerpoint, x))
        elif mypoint == "石头" and computerpoint == "布":
            x = x-5
            print("您出的是：%s,电脑出的是：%s，本回合您输了,当前您的金币为%d" % (mypoint, computerpoint, x))
        elif mypoint == "剪刀" and computerpoint == "布":
            x = x+10
            print("您出的是：%s,电脑出的是：%s，本回合您赢了,当前您的金币为%d" % (mypoint, computerpoint, x))
        elif mypoint == "剪刀" and computerpoint == "石头":
            x = x-5
            print("您出的是：%s,电脑出的是：%s，本回合您输了,当前您的金币为%d" % (mypoint, computerpoint, x))
        elif mypoint == "布" and computerpoint == "石头":
            x = x+10
            print("您出的是：%s,电脑出的是：%s，本回合您赢了,当前您的金币为%d" % (mypoint, computerpoint,x))
        elif mypoint == "布" and computerpoint == "剪刀":
            x = x-5
            print("您出的是：%s,电脑出的是：%s，本回合您输了,当前您的金币为%d" % (mypoint, computerpoint, x))
    else:
        break
if x >= 100:
    print("本局游戏您赢了，您的金币为%d" % x)
else:
    print("本局游戏您输了，您的金币为%d" % x)

